From 2f362eaf0937360a0f2a81bac41be81111fa06a8 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 6 Sep 2024 08:21:27 +0000 Subject: Added reading time timer --- src/pages/blog/[...slug].astro | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/pages/blog/[...slug].astro') diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index c94fe52..a142db4 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -1,6 +1,6 @@ --- import { type CollectionEntry, getCollection } from "astro:content"; -import Layout from "../../layouts/PostLayout.astro"; +import Layout from "../../layouts/PageLayout.astro"; export async function getStaticPaths() { const posts = await getCollection("blog"); @@ -12,9 +12,26 @@ export async function getStaticPaths() { type Props = CollectionEntry<"blog">; const post = Astro.props; -const { Content } = await post.render(); +const { Content, remarkPluginFrontmatter } = await post.render(); --- + + +
+

Title

+

+ + Posted + +  by Valentin Popov ‐ + {remarkPluginFrontmatter.minutesRead} + +

+
-- cgit v1.2.3